﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MyAlbum.Model;
using BlogML.Xml;

namespace MyAlbum.Data
{
    public interface IBlogRepository
    {
        string AddComment(string postId, BlogMLComment comment);
        string AddPost(BlogMLPost post);
        void DeleteComment(string postId, string commentId);
        void DeletePost(string postId);
        BlogMLPost GetPost(string postId);
        IEnumerable<BlogMLPost> GetPosts(int pageIndex, int pageSize, DateTime? sinceDate);
        IEnumerable<BlogMLPost> GetPosts(BlogMLCategory tags, DateTime? sinceDate, int maxCount);
        IEnumerable<BlogMLPost> GetPosts(string searchFilter, DateTime? sinceDate, int maxCount);
        void UpdateComment(string postId, BlogMLComment comment);
        void UpdatePost(BlogMLPost post);

        BlogMLPost GetPostByTitle(string title);

        List<Tag> GetCategories();

        int CountPosts();
    }
}
